{extend name="public/base" /}
{block name="style"}<link href="__LIB__/fileinput/css/fileinput.min.css" rel="stylesheet" /> {/block}
 {block name="body"}
<div class="content-tabs">
	<ol class="breadcrumb">
		<li>
			<a href="{:url('index/index')}"><i class="fa fa-home"></i></a>
		</li>
		<li>
			<a href="{:url('index')}">商家列表</a>
		</li>
		<li><strong>查看商家信息</strong></li>
	</ol>
</div>
<div class="row">
	<div class="col-sm-12">
		<div class="ibox float-e-margins">
			<div class="ibox-content">
				<form id="myForm" class="form-horizontal m-t" method="post" action="{:url('agentinfo')}">
				<input type="hidden" name="id" value="{$ad.id}" />
				<!--店铺基本信息-->
				<div class="panel panel-default">
				<div class="panel-heading"> 店铺基本信息设置</div>
					<div class="panel-body">
						<div class="form-group">
							<label class="col-sm-3 control-label">名称：</label>
							<div class="input-group col-sm-4">
								<input type="text" id="store_name" name="store_name" value="{$ad.store_name}"  class="form-control" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">地址：</label>
							<div class="input-group col-sm-4">
								<input type="text" id="address" name="address" value="{$ad.address}"  class="form-control" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">首页链接：</label>
							<div class="input-group col-sm-4">
								<img src="{$code_url}" width="140px"/>
								<input type="text" name="" class="form-control" value="{$url}" readonly/>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">LOGO：</label>
							<div class="input-group col-sm-4">
								<input type="hidden" id="store_logo" name="store_logo"  value="{$ad.store_logo}"/>
								<input id="upload" name="upload" type="file" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">电话：</label>
							<div class="input-group col-sm-4">
								<input type="text" id="store_tel" name="store_tel" value="{$ad.store_tel}"  class="form-control" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">所在经度：</label>
							<div class="input-group col-sm-4">
								<input type="text" id="longitude" name="longitude" value="{$ad.longitude}"  class="form-control" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">所在纬度：</label>
							<div class="input-group col-sm-4">
								<input type="text" id="latitude" name="latitude" value="{$ad.latitude}"  class="form-control" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">店铺性质：</label>
							<div class="input-group col-sm-4">
								<select class="form-control" name="store_property" disabled="">
									<option>请选择店铺性质</option>
									<option value="1" {if  $ad.store_property == 1}selected{/if}>个人</option>
									<option value="2" {if  $ad.store_property == 2}selected{/if}>商家</option>
									<option value="3" {if  $ad.store_property == 3}selected{/if}>厂家</option>
								</select>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">经营范围：</label>
							<div class="input-group col-sm-4">
								<input type="text" id="business_scope" name="business_scope" value="{$ad.business_scope}"  class="form-control" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">营业时间：</label>
							<div class="input-group col-sm-6">
								<input id='business_start' name='business_start' value="{$ad.business_start}"  style="width: 190px;"  type='time' placeholder="开始时间" class="form-control layer-date" />
								<input id='business_end' name='business_end' value="{$ad.business_end}"  style="width: 190px;"  type='time' placeholder="结束时间" class="form-control layer-date" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">客服电话：</label>
							<div class="input-group col-sm-4">
								<input type="text" id="service_tel" name="service_tel" value="{$ad.service_tel}"  class="form-control" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">客服QQ：</label>
							<div class="input-group col-sm-4">
								<input type="text" id="service_qq" name="service_qq" value="{$ad.service_qq}"  class="form-control" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">客服微信：</label>
							<div class="input-group col-sm-4">
								<input type="text" id="service_Wechat" name="service_Wechat" value="{$ad.service_Wechat}"  class="form-control" />
							</div>
						</div>
					</div>
				</div>
				 <!--店铺基本信息end-->
				
				<!--证件设置-->
				<div class="panel panel-default">
				<div class="panel-heading"> 证件信息</div>
					<div class="panel-body">
						<div class="form-group">
							<label class="col-sm-3 control-label">营业执照：</label>
							<div class="input-group col-sm-4">
								<input type="hidden" id="license" name="license"  value="{$ad.license}"/>
								<input id="upload" name="upload" type="file" />
							</div>
						</div>
					</div>
					<div class="panel-body">
						<div class="form-group">
							<label class="col-sm-3 control-label">相关证件：</label>
							<div class="input-group col-sm-4">
								<input type="hidden" id="credentials" name="credentials"  value="{$ad.credentials}"/>
								<input id="upload" name="upload" type="file" />
							</div>
						</div>
					</div>
				</div>
				<!--证件设置end-->
				
				<!--其他信息设置-->
				<div class="panel panel-default">
				<div class="panel-heading"> 其他</div>
					<div class="panel-body">
						<div class="form-group">
							<label class="col-sm-3 control-label">是否分销：</label>
							<div class="input-group col-sm-4">
								<label class="checkbox-inline h5">
	                                <input type="radio" name="store_state" value="1" {if condition="$ad.store_state==1"} checked{/if}> 开启
								</label>
								<label class="checkbox-inline h5">
	                                <input type="radio" name="store_state" value="0" {if condition="$ad.store_state==0"} checked{/if}> 关闭
								</label>
							</div>	
						</div>	
						<div class="form-group">
							<label class="col-sm-3 control-label">是否有wifi：</label>
							<div class="input-group col-sm-4">
								<label class="checkbox-inline h5">
	                                <input type="radio" name="is_wifi" value="1" {if condition="$ad.is_wifi==1"} checked{/if}> 有
								</label>
								<label class="checkbox-inline h5">
	                                <input type="radio" name="is_wifi" value="0" {if condition="$ad.is_wifi==0"} checked{/if}> 无
								</label>
							</div>	
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">是否7天内退换：</label>
							<div class="input-group col-sm-4">
								<label class="checkbox-inline h5">
	                                <input type="radio" name="is_refund" value="1" {if condition="$ad.is_refund==1"} checked{/if}> 退换
								</label>
								<label class="checkbox-inline h5">
	                                <input type="radio" name="is_refund" value="0" {if condition="$ad.is_refund==0"} checked{/if}> 不退换
								</label>
							</div>	
						</div>
					</div>
				</div>
				<!--其他信息设置end-->
				
				<!--店铺介绍-->
				<div class="panel panel-default">
				<div class="panel-heading"> 店铺介绍</div>
					<div class="panel-body">
						<div class="form-group">
							<label class="col-sm-3 control-label">店铺公告：</label>
							<div class="input-group col-sm-4">
								<textarea id="contents" name="contents" style="width: 500px;" rows="3">									
								</textarea>
							</div>
						</div>
					</div>
					<div class="panel-body">
						<div class="form-group">
							<label class="col-sm-3 control-label">店铺介绍：</label>
							<div class="input-group col-sm-6">
								<textarea id="content" name="content" style="height: 400px;">									
								</textarea>
							</div>
						</div>
					</div>
				</div>
				<!--店铺介绍end-->
				
				<div class="form-group">
					<div class="col-sm-4 col-sm-offset-3">
						<a href="{:url('index')}" class="btn btn-danger"><i class="fa fa-arrow-left"></i> 返回 </a>
					</div>
				</div>
				</form>
			</div>
		</div>
	</div>
</div>
{/block} {block name="script"}
<script src="__JS__/jquery.form.js"></script>
<script src="__LIB__/validate/jquery.validate.min.js"></script>
<script src="__LIB__/validate/messages_zh.min.js"></script>
<script src="__LIB__/validate/add_validate.min.js"></script>
<script src="__LIB__/fileinput/js/fileinput.min.js"></script>
<script src="__LIB__/fileinput/js/locales/zh.js"></script>
<script src="__LIB__/datepicker/WdatePicker.js"></script>
<script src="__LIB__/ueditor/ueditor.config.js" type="text/javascript"></script>
<script src="__LIB__/ueditor/ueditor.all.js" type="text/javascript"></script>
<script>
	//编辑器
	var ueditor = UE.getEditor('content');
	upload_one('{$ad.store_logo}');
	$(function() {
		$("#myForm").validate({
			rules: {
			},
			messages: {
			},
			submitHandler: function(form) {
				ajaxForm();
			}
		});
	});
</script>
{/block}